﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User.Master" AutoEventWireup="true" CodeBehind="UpdateGroup.aspx.cs" Inherits="Event_SG_EWDT.UpdateGroup" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Userhead" runat="server">
    <title>Update Group</title>
	<link href="Styles/TabControl.css" rel="stylesheet" type="text/css" />
	<link href="Styles/GridviewCss/gridview.css" rel="stylesheet" type="text/css" />
	
	<link href="Scripts/jquery.toastmessage.css" rel="stylesheet" type="text/css" />
	<script src="Scripts/jquery.toastmessage.js" type="text/javascript"></script>


<style type="text/css">
		.style6
		{
			width: 100%;
		}
		.style8
		{
			width: 388px;
		}
		.style9
		{
			width: 111px;
		}
		.style10
		{
			width: 188px;
		}
		.MyTabStyle
	{}
	.MyTabStyle
	{}
		</style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="newHolder" runat="server">
    <div class="div_main">
	<p class="h1">
		&nbsp;&nbsp;Manage Group<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1"
			runat="server">
		</ajaxToolkit:ToolkitScriptManager>
</p>
<div class="divProfile">

			<ajaxToolkit:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="2" 
				Width="776px" Height="1000px" CssClass="MyTabStyle">
				<ajaxToolkit:TabPanel ID="TabPanel1" runat="server" HeaderText="Update Group">
					<HeaderTemplate>
						Update Group
					
</HeaderTemplate>
					

<ContentTemplate>
<table class="style6">
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateGroupName" runat="server" CssClass="lbl_field" 
										Text="Group Name"></asp:Label>

        </td>
        <td class="style8">
            <asp:TextBox ID="tbxUpdateGroupName" runat="server" CssClass="tbx_field"></asp:TextBox>

        </td>
        <td class="style8">
                    <asp:RequiredFieldValidator ID="rfvGroupU" runat="server" 
                ControlToValidate="tbxUpdateGroupName" Display="Dynamic" 
                ErrorMessage="Name Required" ValidationGroup="uc"></asp:RequiredFieldValidator>

                </td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateGroupDesc" runat="server" CssClass="lbl_field" 
										Text="Description"></asp:Label>

        </td>
        <td class="style8">
            <asp:TextBox ID="tbxUpdateGroupDesc" runat="server" CssClass="tbx_field_multi" 
										TextMode="MultiLine"></asp:TextBox>

        </td>
        <td class="style8">
                    <asp:RequiredFieldValidator ID="rfvDescU" runat="server" 
                ControlToValidate="tbxUpdateGroupDesc" Display="Dynamic" 
                ErrorMessage="Description Required" ValidationGroup="uc"></asp:RequiredFieldValidator>

                </td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateGroupPrivacy" runat="server" CssClass="lbl_field" 
										Text="Privacy"></asp:Label>

        </td>
        <td class="style8">
            <asp:RadioButtonList ID="rdblUpdateGroupPrivacy" runat="server" CssClass="rbtn" 
										RepeatColumns="3" RepeatDirection="Horizontal" RepeatLayout="Flow" 
										Width="307px">
                <asp:ListItem>Public</asp:ListItem>
<asp:ListItem>Private</asp:ListItem>
<asp:ListItem>Secret</asp:ListItem>
</asp:RadioButtonList>

        </td>
        <td class="style8">
                    <asp:RequiredFieldValidator ID="rfvPrivacyU" runat="server" 
                ControlToValidate="rdblUpdateGroupPrivacy" Display="Dynamic" 
                ErrorMessage="Privacy Required" ValidationGroup="uc"></asp:RequiredFieldValidator>

                </td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateGroupCategory" runat="server" CssClass="lbl_field" 
										Text="Category"></asp:Label>

        </td>
        <td class="style8">
            <asp:DropDownList ID="ddlUpdateGroupCat" runat="server" CssClass="tbx_field" 
										DataSourceID="GroupTypeObjectDataSource" DataTextField="GroupTypeName" 
										DataValueField="GroupTypeId">
                <asp:ListItem>Technology</asp:ListItem>
<asp:ListItem>Sports</asp:ListItem>
<asp:ListItem>Pets</asp:ListItem>
</asp:DropDownList>

        </td>
        <td class="style8">
                    <asp:RequiredFieldValidator ID="rfvCategoryU" runat="server" 
                ControlToValidate="ddlUpdateGroupCat" Display="Dynamic" 
                ErrorMessage="Category Required" ValidationGroup="uc"></asp:RequiredFieldValidator>

                </td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateGroupThumbnail" runat="server" CssClass="lbl_field" 
										Text="Group Logo"></asp:Label>

        </td>
        <td class="style8">
            <asp:FileUpload ID="fuUpdateGroupThumbnail" runat="server" 
										CssClass="tbx_field" />

        </td>
        <td class="style8">
                    <asp:RegularExpressionValidator ID="revThumbU" runat="server" 
                ControlToValidate="fuUpdateGroupThumbnail" Display="Dynamic" 
                ErrorMessage="Invalid Image File Format" 
                ValidationExpression=".+[.](jpg|png|gif|bmp|jpeg|JPG|PNG|GIF|BMP|JPEG)$" 
                ValidationGroup="uc"></asp:RegularExpressionValidator>

                </td>
    </tr>
    <tr>
        <td class="style10">
            <asp:Label ID="lblUpdateGroupLogo" runat="server" CssClass="lbl_field" 
										Text="Group Logo"></asp:Label>

        </td>
        <td class="style8">
            <asp:FileUpload ID="fuUpdateGroupLogo" runat="server" CssClass="tbx_field" />

            <asp:ObjectDataSource ID="GroupTypeObjectDataSource" runat="server" 
										SelectMethod="RetrieveGroupType" TypeName="Event_SG_EWDT.DBMANAGER"></asp:ObjectDataSource>

        </td>
        <td class="style8">
                    <asp:RegularExpressionValidator ID="revLogoU" runat="server" 
                ControlToValidate="fuUpdateGroupLogo" Display="Dynamic" 
                ErrorMessage="Invalid Image File Format" 
                ValidationExpression=".+[.](jpg|png|gif|bmp|jpeg|JPG|PNG|GIF|BMP|JPEG)$" 
                ValidationGroup="uc"></asp:RegularExpressionValidator>

                </td>
    </tr>
    <tr>
        <td class="style10">
            &nbsp;</td>
        <td class="style8">
            &nbsp;</td>
        <td class="style8">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            &nbsp;</td>
        <td class="style8">
            <asp:Button ID="btnUpdateGroup" runat="server" CssClass="btnCreateEvent" 
										onclick="btnUpdateGroup_Click" Text="Update!" ValidationGroup="uc" />

        </td>
        <td class="style8">
            &nbsp;</td>
    </tr>
    <tr>
        <td class="style10">
            &nbsp;</td>
        <td class="style8">
            &nbsp;</td>
        <td class="style8">
            &nbsp;</td>
        <td class="style9">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
</table>
</ContentTemplate>
				

</ajaxToolkit:TabPanel>
				
				<ajaxToolkit:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3" Width="150px">
					<HeaderTemplate>
						Who's in the Group?
					
</HeaderTemplate>
					

<ContentTemplate>
					<div class="Div_myEvent_main">

		<asp:GridView ID="gvWhoIsInGroup" runat="server"
			AllowPaging="True"
			AutoGenerateColumns="False" 
			 
			CssClass="mGrid"
			PageSize="20"
			HorizontalAlign="Center" DataSourceID="GroupMembersSource" AllowSorting="True" 
							onselectedindexchanged="gvWhoIsInGroup_SelectedIndexChanged">
			
			<AlternatingRowStyle CssClass="alt" />
			
			<Columns>
				<asp:BoundField DataField="membership_no" HeaderText="ID" />
				<asp:BoundField DataField="name" HeaderText="Name" />
				<asp:BoundField DataField="email" HeaderText="Email" />
				<asp:BoundField DataField="member_type" HeaderText="Member Type" />
				<asp:ButtonField ButtonType="Button" CommandName="Select" 
					HeaderText="Membership" Text="Revoke" />
			</Columns>
			
			<PagerStyle CssClass="pgr" />
		</asp:GridView>


						<asp:ObjectDataSource ID="GroupMembersSource" runat="server" 
							DataObjectTypeName="Event_SG_EWDT.MemberEvent" 
							SelectMethod="RetrieveGroupMembers" TypeName="Event_SG_EWDT.DBQUERIES" 
							UpdateMethod="UpdateMemberEvent_Role">
							<SelectParameters>
								<asp:SessionParameter Name="groupid" SessionField="Group" Type="String" />
							</SelectParameters>
						</asp:ObjectDataSource>


		</div>
					
</ContentTemplate>
				

</ajaxToolkit:TabPanel>
				<ajaxToolkit:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
				<HeaderTemplate>
				Pending List
				
</HeaderTemplate>
				

<ContentTemplate>

					<div class="Div_myEvent_main">
						<asp:GridView ID="gvPendingGroupList" runat="server" AllowPaging="True" 
							AutoGenerateColumns="False" CssClass="mGrid" 
							HorizontalAlign="Center" 
							PageSize="20" 
						    DataSourceID="GroupPendingSource" 
							onrowcommand="gvPendingGroupList_RowCommand">
							<AlternatingRowStyle CssClass="alt" />
							<Columns>
								<asp:BoundField DataField="membership_no" HeaderText="Membership No." />
								<asp:BoundField DataField="name" HeaderText="Name" />
								<asp:BoundField DataField="group_id" HeaderText="Group ID" />
								<asp:BoundField DataField="group_name" HeaderText="Group Name" />
								<asp:ButtonField CommandName="Accept" HeaderText="Accept" Text="Accept" />
								<asp:ButtonField CommandName="Reject" HeaderText="Reject" Text="Reject" />
							</Columns>
							<PagerStyle CssClass="pgr" />
						</asp:GridView>
						
					 
						<asp:ObjectDataSource ID="GroupPendingSource" runat="server" 
							DataObjectTypeName="Event_SG_EWDT.MemberEvent" 
							SelectMethod="RetrieveGroupPendingList" TypeName="Event_SG_EWDT.DBQUERIES" 
							UpdateMethod="UpdateMemberEvent_Role">
							<SelectParameters>
								<asp:SessionParameter Name="group_id" SessionField="Group" Type="Int32" />
							</SelectParameters>
						</asp:ObjectDataSource>
						
					 
					</div>

				
</ContentTemplate>

				

</ajaxToolkit:TabPanel>
			</ajaxToolkit:TabContainer>
	</div>
<!--original-->

	</div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolderUser" runat="server">
</asp:Content>
